<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>DOM操作2</title>
    </head>
    <body>
        <input type="text" id="i1" value="260">
        <input type="text" id="i2" value="260">
        <button onclick="f()">点我</button>
        <hr>
        <h4>我是标题：<span id="ss"></span></h4>
        <button onclick="f2()">小小按钮</button>
        <script>
            function f2(){
                let spanE1 = document.querySelector('span');
                // let spanE2 = document.querySelector('#ss');
                // let spanE3 = document.querySelector('ss');
                spanE1.innerHTML = '我好nm';
            }
            function f(){
                let a = parseFloat(i1.value);
                let b = parseFloat(i2.value);
                alert(a+b);
                console.log(a+b)
            }
        </script>
    </body>
</html>